package saxion.speelveld.spaceengineer.buildings;

import saxion.speelveld.spaceengineer.R;
import saxion.speelveld.spaceengineer.model.ProducingBuilding;
import saxion.speelveld.spaceengineer.model.Resource;
import saxion.speelveld.spaceengineer.model.ResourceType;

public class GreenHouse extends ProducingBuilding
{

	public GreenHouse()
	{
		super(2, 2);
		super.setBuildingName(GreenHouse.this.getClass().getSimpleName());
		super.setBuildingExplanation("The Green House supplies you with oxygen and vegetables or wood.");
		super.resourceCosts.add(new Resource(ResourceType.MONEY, 300));
		super.resourceCosts.add(new Resource(ResourceType.ELECTRICITY, 20));
		super.resourceCosts.add(new Resource(ResourceType.WATER, 100));
		super.resourceCosts.add(new Resource(ResourceType.GLASS, 200));
		super.resourceCosts.add(new Resource(ResourceType.METAL, 50));
		super.resourceCosts.add(new Resource(ResourceType.SAND, 100));

		// 1 van deze 2
		super.addPossibleResourceProducement(new Resource(ResourceType.FOOD, 2, true), new Resource(ResourceType.WATER,
			4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.WOOD, 1, true), new Resource(ResourceType.WATER,
			4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.COTTON, 2, true), new Resource(
			ResourceType.WATER, 4, true));

		// en deze 2
		super.addResourceProduceGain(new Resource(ResourceType.OXYGEN, 1, true));
		super.addResourceProduceGain(new Resource(ResourceType.HAPPINESS, 1, false));

		// Mitchell's gedachte :)
		/**
		 * super.setResourcesProduced(ResourceType.VEGETABLES); super.setResourcesProduced(ResourceType.OXYGEN);
		 * super.setResourcesProduced(ResourceType.HAPPINESS);
		 * 
		 * if (super.getResourcesProduced() == ResourceType.HAPPINESS) { super.setProductioncapacity(1); } if
		 * (super.getResourcesProduced() == ResourceType.OXYGEN) { super.setProductioncapacity(1); } if
		 * (super.getResourcesProduced() == ResourceType.VEGETABLES) { super.setProductioncapacity(1); }
		 */

		super.resourceImages = new int[4];
		super.resourceImages[0] = R.drawable.greenhouse_0;
		super.resourceImages[1] = R.drawable.greenhouse_1;
		super.resourceImages[2] = R.drawable.greenhouse_2;
		super.resourceImages[3] = R.drawable.greenhouse_3;
		super.setPreviewResourceImageId(R.drawable.greenhouse);
	}
	// @Override
	// public int produceGoods()
	// {
	// return 0;
	// }

}
